package com.suli.multimedia.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.suli.multimedia.enums.TicketType;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author SuLi
 * @since 2022-04-02
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
@TableName("scenic_ticket")
public class ScenicTicket implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 门票id
     */
    @TableId(value = "scenic_ticket_id", type = IdType.AUTO)
    private Integer scenicTicketId;

    /**
     * 门票名称
     */
    @TableField("scenic_ticket_name")
    private String scenicTicketName;

    /**
     * 门票数量
     */
    @TableField("scenic_ticket_number")
    private Integer scenicTicketNumber;

    /**
     * 门票过期时间
     */
    @TableField("scenic_ticket_expire")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date scenicTicketExpire;

    /**
     * 门票销量
     */
    @TableField(value = "scenic_ticket_sale",fill = FieldFill.INSERT)
    private Integer scenicTicketSale;

    /**
     * 门票价格
     */
    @TableField("scenic_ticket_price")
    private BigDecimal scenicTicketPrice;

    /**
     * 版本号
     */
    @TableField(value = "scenic_ticket_version",fill = FieldFill.INSERT)
    @Version
    private Integer scenicTicketVersion;

    /**
     * 门票状态
     */
    @TableField(value = "scenic_ticket_status",fill = FieldFill.INSERT)
    private TicketType scenicTicketStatus;

    /**
     * 门票发布时间
     */
    @TableField(value = "scenic_ticket_publishtime",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date scenicTicketPublishtime;

    /**
     *
     * 门票开始购买的时间
     */
    @TableField("scenic_ticket_start")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date scenicTicketStart;

    /**
     * 门票描述信息
     */
    @TableField("scenic_ticket_description")
    private String scenicTicketDescription;
}
